clear all

** Set working directory: please set your own
/*
cd "~/Dropbox/sanctions_replication/"
*/
** Open dataset
use data/representativeness.dta, clear

** Analyses
local variables_representativeness left_right_self age_calculated pol_interest female_dummy ///
canarias murcia andalucia balears valencia cataluna extremadura castilla_mancha ///
castilla_leon madrid aragon rioja navarra pais_vasco cantabria asturias galicia

estpost ttest `variables_representativeness', by(ess_dummy)

esttab using tables/tablea1.tex, tex wide nonumber nomtitles ///
coeflabels(left_right_self "Left-right self placement" ///
female_dummy "Female (dummy)" age_calculated "Age (calculated)" ///
pol_interest "Political interest" canarias "Canarias" murcia "Murcia" ///
andalucia "Andalucia" balears "Balears" valencia "Valencia" cataluna "Catalunya" ///
extremadura "Extremadura" castilla_mancha "Castilla La Mancha" castilla_leon "Castilla y Leon" ///
madrid "Madrid" aragon "Aragon" rioja "Rioja" navarra "Navarra" pais_vasco "Basque country" ///
cantabria "Cantabria" asturias "Asturias" galicia "Galicia") replace ///
addnotes("Entries represent results of t-tests." "Positive values mean that the variable has a higher value in our sample than in the ESS one.")
